package com.coolweather.android;


import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

import com.coolweather.android.databinding.ActivityExamBinding;

public class ExamActivity extends AppCompatActivity implements View.OnClickListener {
    ActivityExamBinding binding;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding=ActivityExamBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        binding.btn01.setOnClickListener(this);
        binding.btn02.setOnClickListener(this);
        binding.btn03.setOnClickListener(this);
        binding.btn04.setOnClickListener(this);

    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.btn01:
                jump2Activity(MainActivity.class);
                break;
            case R.id.btn02:
                break;
            case R.id.btn03:
                break;
            case R.id.btn04:
                break;
        }
    }

    private void jump2Activity(Class<? extends AppCompatActivity> clazz) {
        Intent intent=new Intent(this,clazz);
        startActivity(intent);
    }
}